<UserControl x:Class="UColor.Modules.Gallery.ImageViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:UColor.Modules.Gallery">
    <Border x:Name="border" BorderThickness="1" Background="Transparent">
        <ScrollViewer x:Name="scrollHost" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
            <local:ImagePresenter Scale="{Binding Scale}" Rotation="{Binding Rotation}" Focusable="False" VerticalAlignment="Center" HorizontalAlignment="Center" FlowDirection="LeftToRight">
                <local:ImagePresenter.Content>
                    <Image x:Name="image" Source="{Binding ImageSource}" Stretch="None" MouseMove="OnImageMouseMove" LostMouseCapture="OnImageLostMouseCapture"
                           MouseLeftButtonDown="OnImageMouseLeftButtonDown" MouseLeftButtonUp="OnImageMouseLeftButtonUp" />
                </local:ImagePresenter.Content>
            </local:ImagePresenter>
        </ScrollViewer>
    </Border>
</UserControl>
